<?php

$_this =& $this;

/* @var $_this View */
/* @var $form FormHelper */
/* @var $editForm EditFormHelper */
/* @var $html HtmlHelper */
/* @var $ehtml EHtmlHelper */
/* @var $javascript JavascriptHelper */
/* @var $jqax JqaxHelper */
/* @var $filterBlock FilterBlock */

?><?=$editForm->create($modelName, array('url'=>("/{$url_part}/".($mode == 'create' ? 'new' : $this->data[$modelName][$PKName]).'/'), 'allowInput' => $this->data[$modelName]['__allows']['update']));?><?php

    if ($mode !== 'create') {
    	?><?=$editForm->startSet();?><?php
            	?><?=$editForm->datetimeView(__d($po_domain, 'created_field', true), $this->data[$modelName]['created']);?><?php
    	?><?=$editForm->endSet();?><?php
    }

    ?><?=$editForm->startSet();?><?php
		?><?=$editForm->text("title", __d($po_domain, 'title', true), array('required' => true, 'vertical' => false));?><?php
		?><?=$editForm->text("url_title", __d($po_domain, 'url_title', true), array('required' => true, 'vertical' => false));?><?php
		?><?=$editForm->textarea("content", __d($po_domain, 'content', true), array('required' => true, 'vertical' => true, 'rows'=>20, 'cols'=>100));?><?php
		/*?><?=$editForm->select("tags", __d($po_domain, 'tags', true), $tags_list, null, array('required' => true, 'vertical' => false), false);?><?php*/
	?><?=$editForm->endSet();?><?php

	$buttonsHTML = '';
	$buttonsHTML .= (strlen($buttonsHTML) ? ' ' : '').$editForm->back("/{$url_part}/");
	if ($this->data[$modelName]['__allows']['update']) {
	   $buttonsHTML .= (strlen($buttonsHTML) ? ' ' : '').$editForm->submit(__d(null, ($mode == 'create' ? 'create' : 'save'), true), array());
	}
	if (strlen($buttonsHTML)) {
    	?><?=$editForm->cell($buttonsHTML);?><?php
	}

?><?=$editForm->end();?><?php

?>